package com.cadang.android.bbrproject.util;

public class MediaStream {
	private String mMediaLabel;
	private String mMediaUrl;
	
	public MediaStream(){
		this("","");
	}
	public MediaStream(String streamLabel, String streamUrl){
		mMediaLabel 	= streamLabel;
		mMediaUrl		= streamUrl;
	}
	public String getLabel(){
		return mMediaLabel;
	}
	public String getUrl(){
		return mMediaUrl;
	}
	public void setLabel(String mediaLabel){
		mMediaLabel = mediaLabel;
	}
	public void setUrl(String mediaUrl){
		mMediaUrl = mediaUrl;
	}
	
	@Override
	public boolean equals(Object obj){
		if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        MediaStream other = (MediaStream) obj;
        if (mMediaLabel == null) {
            if (other.mMediaLabel != null)
                return false;
        }
        else if (!mMediaLabel.equals(other.mMediaLabel))
            return false;
        if (mMediaUrl == null) {
            if (other.mMediaUrl != null)
                return false;
        }
        else if (!mMediaUrl.equals(other.mMediaUrl))
            return false;
        return true;
	}
	@Override
	public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result
                + ((mMediaLabel == null) ? 0 : mMediaLabel.hashCode());
        result = prime * result
                + ((mMediaUrl == null) ? 0 : mMediaUrl.hashCode());
        return result;
    }
}
